/*
 * fbank.com Inc.
 * Copyright (c) 2020 All Rights Reserved.
 * create by fm
 * date:2020-04-26
 *
 */
package com.ouwen.smartpay.service;

import com.fm.core.common.facade.MerchOrderBase;
import com.fm.core.common.service.EntityService;
import com.ouwen.smartpay.entity.OrderInfo;
import com.ouwen.smartpay.openapi.order.ServiceOrder;

/**
 * 统一订单流水 Service接口
 * <p>
 * Date: 2020-04-26 10:59:41
 *
 * @author fm
 */
public interface OrderInfoService extends EntityService<OrderInfo> {

    /***
     *
     * 通过商户号\订单号\请求流水\服务 查询订单
     *
     * @author liyong
     * @date 11:13 2020-04-26
     * @param orderInfo
     * @exception
     * @return com.fbank.smartpay.entity.OrderInfo
     **/
    OrderInfo findOderInfoByPartnerIdAndRequestNoService(OrderInfo orderInfo);

    /***
     *
     * 通过商户号/请求流水号查询
     *
     * @author liyong
     * @date 17:36 2020-04-26
     * @param partnerId
     * @param requestNo
     * @exception
     * @return com.fbank.smartpay.entity.OrderInfo
     **/
    OrderInfo findOrderInfoByPartnerIdAndAndSubParentIdRequestNo(String partnerId, String subPartnerId, String requestNo);

    /***
     *
     * 通过商户号/商户订单好/业务订单号号查询
     *
     * @author liyong
     * @date 11:09 2020-04-27
     * @param partnerId
     * @param merchOrderNo
     * @exception
     * @return com.fbank.smartpay.entity.OrderInfo
     **/
    OrderInfo findOrderInfoByPartnerIdAndMerchOrderNo(String partnerId, String subPartnerId, String merchOrderNo);


    void saveOrderInfo(ServiceOrder serviceOrder, MerchOrderBase merchOrder);
}
